<div id="<?php echo $id;?>" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" onclick="cleanVar();" aria-hidden="true"><i class="icon-plus"></i></button>
    <h3 id="myModalLabel"><?php echo $head;?></h3>
  </div>
  <div class="modal-body">
 
      
     
    <?php 
    if($op!=1){
    
      $attributes = array('class' => 'form-horizontal', 'id' => 'mi_form','onsubmit' => 'fake_load();');
      
      echo form_open($url, $attributes);
       for($i=0;$i<count($labels);$i++){ ?>
        <div class="control-group">
           <label class="control-label" ><?php echo $labels[$i]?></label>
          <div class="controls">
            <?php echo $obj[$i]?>
          </div>
        </div>
        <?php }
        
        }else { ?>
        <?php    
         echo $body;
        }?>
      
  </div>
  <div class="modal-footer">
    <?php for($i=0;$i<count($footer);$i++){ ?>
      <?php echo $footer[$i]?>
    <?php } ?>
  </div>
    </form>
</div>
